<template>
  <div>
    <ul>
      <h2>{{ route.meta.desc }}</h2>
      <li>学生姓名：{{ route.query.name }}</li>
      <li>学生年龄：{{ route.query.age }}</li>
      <h3>下面是使用param传参的信息</h3>
      <li>学生姓名：{{ route.params.name }}</li>
      <li>学生年龄：{{ route.params.age }}</li>
    </ul>
  </div>
</template>

<script setup lang="ts">
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
console.log("当前页面的路由信息", route);
console.log("整个项目路由器", router);
</script>

<style scoped>
ul {
  text-align: center;
  font-size: 20px;
  color: deeppink;
  list-style-type: none;
}
</style>
